<ion-view title="公告" nav-transition="none">
  <div class="top-fixed">
    <ionic-datepicker input-obj="notiCtrl.datepickerObject">
      <button class="button button-block button-light">
        {{notiCtrl.datepickerObject.inputDate | date:'yyyy年MM月dd日'}}</button>
    </ionic-datepicker>
  </div>

  <ion-content>
    <ion-refresher
        pulling-text="下拉刷新..."
        on-refresh="notiCtrl.doRefresh()">
    </ion-refresher>
    <div class="list">
      <div class="item item-avatar" ng-repeat="item in notiCtrl.views" ng-show="item.leaveTimes.length > 0 || item.leaveDelayTimes.length > 0">
        <img ng-src="{{item.user.avatorImg? item.user.avatorImg : 'img/ben.png'}}">
        <h2>{{item.user.depart.departName}} {{item.user.name}}</h2>
        <p style="text-align: center" ng-repeat="time in item.leaveTimes">
          原：{{time.starttime | date:'MM月dd日HH点'}}~{{time.endtime | date:'MM月dd日HH点'}}
        </p>
        <p style="text-align: center" ng-repeat="time in item.leaveDelayTimes">
          延期：{{time.starttime | date:'MM月dd日HH点'}}~{{time.endtime | date:'MM月dd日HH点'}}
        </p>
        <div class="right-top-cornor">
          <p>{{findFirstType(item.type).name}}</p>
        </div>
      </div>
    </div>
  </ion-content>
</ion-view>
